package com.ruoyi.exam.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.ExamAnswerMapper;
import com.ruoyi.exam.domain.ExamAnswer;
import com.ruoyi.exam.service.IExamAnswerService;

/**
 * 考试答案Service业务层处理
 * 
 * @author ba7lgj
 * @date 2024-04-03
 */
@Service
public class ExamAnswerServiceImpl implements IExamAnswerService 
{
    @Autowired
    private ExamAnswerMapper examAnswerMapper;

    /**
     * 查询考试答案
     * 
     * @param answerId 考试答案主键
     * @return 考试答案
     */
    @Override
    public ExamAnswer selectExamAnswerByAnswerId(Long answerId)
    {
        return examAnswerMapper.selectExamAnswerByAnswerId(answerId);
    }

    /**
     * 查询考试答案列表
     * 
     * @param examAnswer 考试答案
     * @return 考试答案
     */
    @Override
    public List<ExamAnswer> selectExamAnswerList(ExamAnswer examAnswer)
    {
        return examAnswerMapper.selectExamAnswerList(examAnswer);
    }

    /**
     * 新增考试答案
     * 
     * @param examAnswer 考试答案
     * @return 结果
     */
    @Override
    public int insertExamAnswer(ExamAnswer examAnswer)
    {
        return examAnswerMapper.insertExamAnswer(examAnswer);
    }

    /**
     * 修改考试答案
     * 
     * @param examAnswer 考试答案
     * @return 结果
     */
    @Override
    public int updateExamAnswer(ExamAnswer examAnswer)
    {
        return examAnswerMapper.updateExamAnswer(examAnswer);
    }

    /**
     * 批量删除考试答案
     * 
     * @param answerIds 需要删除的考试答案主键
     * @return 结果
     */
    @Override
    public int deleteExamAnswerByAnswerIds(Long[] answerIds)
    {
        return examAnswerMapper.deleteExamAnswerByAnswerIds(answerIds);
    }

    /**
     * 删除考试答案信息
     * 
     * @param answerId 考试答案主键
     * @return 结果
     */
    @Override
    public int deleteExamAnswerByAnswerId(Long answerId)
    {
        return examAnswerMapper.deleteExamAnswerByAnswerId(answerId);
    }
}
